<script setup lang="ts">
import { Descriptions } from '@/components/Descriptions'
import formatDate from '@/utils/Time'
const prop = defineProps({
  currentRow: {
    default: () => null
  },
  detailSchema: {
    default: () => null
  }
})
</script>
<template>
      <Descriptions
        title="优惠券详情"
        message="message"
        :data="prop.currentRow"
        :schema="prop.detailSchema"
      >
        <template #mode="{row}">
            {{row.mode==2?'自动发放':row.mode==3?'活动领取':row.mode==4?'人工发放':row.mode==5?'无限制':''}}
        </template>
        <template #online="{row}">
            {{row.online==2?'上架':'下架'}}
        </template>   
        <template #end_date={row}>
            {{formatDate(row.end_date,'yyyy-MM-dd')}}
        </template> 
         <template #start_date={row}>
            {{formatDate(row.start_date,'yyyy-MM-dd')}}
        </template> 
      </Descriptions>
</template>